// Pay attention here // 注意这里的导入方式
import * as VueRouter from 'vue-router'

// import Home from '@/pages/index/index.vue'

const router = VueRouter.createRouter({
  history: VueRouter.createWebHashHistory(),
  routes: [
    {
      path: '/',
      // https://v3.cn.vuejs.org/guide/ssr/routing.html#%E4%BB%A3%E7%A0%81%E5%88%86%E7%A6%BB
      // ok - 1 - 代码分离、或懒加载
      component: () => import('@/pages/index/index.vue')
      // ok - 2
      // component: Home
    },
    {
      path: '/props',
      component: () => import('@/pages/props/props')
    },
    {
      path: '/comp',
      component: () => import('@/pages/comp/comp')
    },
    {
      path: '/router',
      component: () => import('@/pages/router/router')
    },
    {
      path: '/routerback',
      component: () => import('@/pages/router/back')
    },
  ]
})

export default router